﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AnOtherBlog.Core
{
	/// <summary>
	/// Comentarios asociados a una publicación
	/// </summary>
	public class Comment : BlogBaseClass<Comment, Guid>
	{

		#region Constructors

		public Comment()
		{
			base.Id = Guid.NewGuid();
			base.DateCreated = DateTime.Now;
		}
		
		#endregion

		#region Fields and Properties

		/// <summary>
		/// Identificador del comentario
		/// Id de la clase base
		/// </summary>
		public Guid PostCommentID
		{
			get
			{
				return this.Id;
			}
			set
			{
				this.Id = value;
			}
		}

		private Guid _PostID;
		/// <summary>
		/// Referencia a la publicación
		/// </summary>
		public Guid PostID
		{
			get
			{
				return _PostID;
			}
			set
			{
				_PostID = value;
			}
		}

		/// <summary>
		/// Fecha del comentario
		/// DateCreated de la clase base
		/// </summary>
		public DateTime CommentDate
		{
			get
			{
				return this.DateCreated;
			}
			set
			{
				this.DateCreated = value;
			}
		}

		private string _Author;
		/// <summary>
		/// Nombre del autor del comentario
		/// </summary>
		public string Author
		{
			get
			{
				return _Author;
			}
			set
			{
				_Author = value ?? string.Empty;
			}
		}

		private string _Email;
		/// <summary>
		/// Cuenta de correo del autor del comentario
		/// </summary>
		public string Email
		{
			get
			{
				return _Email;
			}
			set
			{
				_Email = value ?? string.Empty;
			}
		}

		private string _Website;
		/// <summary>
		/// Sitio web del autor del comentario
		/// </summary>
		public string Website
		{
			get
			{
				return _Website;
			}
			set
			{
				_Website = value ?? string.Empty;
			}
		}

		private string _CommentContent;
		/// <summary>
		/// Cuerpo del comentario
		/// </summary>
		public string CommentContent
		{
			get
			{
				return _CommentContent;
			}
			set
			{
				_CommentContent = value ?? string.Empty;
			}
		}

		private string _Country;
		/// <summary>
		/// País del autor del comentario
		/// </summary>
		public string Country
		{
			get
			{
				return _Country;
			}
			set
			{
				_Country = value ?? string.Empty;
			}
		}

		private string _IP;
		/// <summary>
		/// IP desde donde se origina el comentario
		/// </summary>
		public string IP
		{
			get
			{
				return _IP;
			}
			set
			{
				_IP = value ?? string.Empty;
			}
		}

		private bool _IsApproved;
		/// <summary>
		/// Esta aprobado
		/// </summary>
		public bool IsApproved
		{
			get
			{
				return _IsApproved;
			}
			set
			{
				_IsApproved = value;
			}
		}

		#endregion

	}
}
